package cn.ljy.uem.dao;

import cn.ljy.authority.dao.BaseMapper;
import cn.ljy.uem.model.SchoolClass;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;

/**
 * 学校类映射器
 *
 * @author 廖振豪
 * @description 行政班的数据层操作类
 * @date 2022-7-6 10:45
 */
@Mapper
public interface SchoolClassMapper extends BaseMapper<SchoolClass> {


   /**
    * 李明锋 2022-8-2
    *查找学生相关联的班级name以便展示excel下拉框
    * @return {@link List}<{@link String}>
    */
   @Select("select name from school_class order by sort asc")
   List<String>  getClassname();

   /**
    * 王秋林 获取学生所在的所有教学班 用于查找课程
    * @param classId
    * @return
    */
   @Select("select * from school_class where id = #{classId} order by sort asc")
   List<SchoolClass> getStudentAllClasses(Integer classId);
}
